﻿cmake_minimum_required(VERSION 3.20)

project(CppWithYaml)

SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install/${CMAKE_BUILD_TYPE})

#设置cmake模块路径包含
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})

#设置通用的搜索文件
set(SourceFileTypes "./*.h" "./*.cpp" "./*.hpp" "./*.ui" "./*.qml" "./*.qrc" "./*.json" "./*.js" "./*.xlsx")

#设置输出路径
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

#设定debug下库文件后缀名
set(CMAKE_DEBUG_POSTFIX "d")

add_subdirectory(src)
